<?php include THEMES_PATH.'public/before_body2.phtml';?>
<style>
.bg {background:url(/web/Tpl/default/special/wedding/img/bg.png);}
.map {width:315px;height:315px;}
.map img {max-width:inherit;}
.map .BMap_bubble_title {font-weight:600;line-height:2 !important;}
.map .BMap_bubble_content {font-size: 14px;}
.maps li {float:left;background-color:rgba(255,255,255,.5) !important;background-color:#fff;filter:alpha(opacity=50);text-align:center;}
.maps .map-info {padding:99px 0;}
.map-info strong {display:block;position:relative;margin-bottom:30px;font-size:24px;font-weight:normal;}
.map-info p {position:relative;font-size:14px;line-height:2;}

@media screen and (max-width: 900px) {
  .maps {text-align:center;}
  .maps li {float:none;display:inline-block;margin-bottom:15px;vertical-align:top;*display:inline;*zoom:1;}
}

@media screen and (max-width: 400px) {
  .maps li {display:block;}
  .maps .map-info {padding:2em 0;}
}
</style>
</head>
<body>
<?php include THEMES_PATH.'public/header2.phtml';?>
<div class="align-center">
  <img src="/web/Tpl/default/special/wedding/img/banner.jpg" alt="2016全民婚礼季" class="vm">
</div>
<div class="mb2x align-center bg">
  <div class="w1366 auto">
    <img src="/web/Tpl/default/special/wedding/img/1.png" alt="2016全民婚礼季" class="pull-right">
    <div class="clearfix">
      <img src="/web/Tpl/default/special/wedding/img/2.png" alt="2016全民婚礼季" class="pull-left mr5x">
      <div class="pull-left mt2x">
        <h1 class="noraml" style="font-size:16px;">凭优惠券定制OWNONLY高端西装，直减680，再送超值配饰大礼包:</h1>
        <h1 class="noraml" style="font-size:16px;">「 280元真丝领带或领结 + 160元袖扣或领带夹 + 128方巾」</h1>
      </div>
    </div>
  </div>
</div>
<!-- <ul class="clearfix maps js-maps">
  <li class="map" id="map1"></li>
  <li class="map-info">
    <strong>索菲亚婚庆</strong>
    <p>拱墅区花园岗街209号<br>索菲亚一站式婚礼体验馆</p>
  </li>
  <li class="map" id="map2"></li>
  <li class="map-info">
    <strong>风尚堂摄影</strong>
    <p>滨江区滨安路1180号华业科技园2号楼5楼<br>(0571)86805172</p>
  </li>
  <li class="map" id="map3"></li>
  <li class="map-info">
    <strong>爱罗婚纱摄影</strong>
    <p>上城区秋涛路296号尚筑金座206室<br>(0571)81390097</p>
  </li>
</ul> -->
<!-- <p class="mt5x mb5x align-center font-md black">更多合作店铺，洽谈中...... 敬请期待 !</p> -->
<script src="http://api.map.baidu.com/api?v=2.0&ak=mEWdV2P0NcBhaxcGBvlHfruy"></script>
<script>
$(function () {
  var $win = $(window),
  addControl = function (map) {// 添加地图类型控件
    var top_left_control = new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT});// 左上角，添加比例尺
    var top_left_navigation = new BMap.NavigationControl();  //左上角，添加默认缩放平移控件
    map.addControl(top_left_control);
    map.addControl(top_left_navigation);
  },
  addMarker = function (map, point) {
    var myIcon = new BMap.Icon(
      'http://api.map.baidu.com/img/markers.png',
      new BMap.Size(20, 25),
      {
        imageOffset: new BMap.Size(0, -275)
      });
    var marker = new BMap.Marker(point, {icon: myIcon});         // 创建标注
    map.addOverlay(marker);                                      // 将标注添加到地图中
    return marker;
  },
  addInfoWindow = function (map, marker, point, title, info) {
    var opts = {
      width : 100,
      height: 100,
      title : title,
      enableMessage: true,
      message: '看下链接地址'
    }
    var infoWindow = new BMap.InfoWindow(info, opts);         // 创建信息窗口对象
    marker.addEventListener('click', function () {            // 开启信息窗口
      map.openInfoWindow(infoWindow, point);
    });
  },
  mapInit = function (settings) {
    var id = settings.id,
        coords = settings.coords,
        city = settings.city || '杭州',
        title = settings.title,
        info = settings.info;

    var map = new BMap.Map(id);                                    // 创建Map实例
    var point = new BMap.Point(coords.longitude, coords.latitude);
    map.centerAndZoom(point, 15);                                  // 初始化地图,设置中心点坐标和地图级别
    map.enableScrollWheelZoom(true);                               // 开启鼠标滚轮缩放

    var marker = addMarker(map, point);

    if (city) {
      map.setCurrentCity(city);                                      // 设置地图显示的城市 此项是必须设置的
    }

    if (info) {
      addInfoWindow(map, marker, point, title, info);
    }
  },
  setWidth = function () {
    $.each($('.js-maps'), function () {
      var winWidth = $win.width(),
          $items = $(this).children(),
          length = $items.length,
          unitWidth = winWidth / length,
          cssFloat = $items.css('float'),
          cssDisplay = $items.css('display');

      if (cssFloat === 'left' || cssFloat === 'right' || cssDisplay === 'inline-block' || cssDisplay === 'inline') {
        $items.width(unitWidth);

        if (winWidth < 900) {
          $items.width('49%');
        }
      } else {
        $items.width('100%');
      }
    });
  };

  setWidth();

  $win.on('resize', function () {
    setWidth();
  });

  // mapInit({
  //   id: 'map1',
  //   coords: {
  //     longitude: 120.124952,
  //     latitude: 30.327545
  //   },
  //   title: '索菲亚婚庆',
  //   info: '拱墅区花园岗街209号<br>索菲亚一站式婚礼体验馆'
  // });

  // mapInit({
  //   id: 'map2',
  //   coords: {
  //     longitude: 120.187215,
  //     latitude: 30.191608
  //   },
  //   title: '风尚堂摄影',
  //   info: '滨江区滨安路1180号华业科技园2号楼5楼<br>(0571)86805172'
  // });

  // mapInit({
  //   id: 'map3',
  //   coords: {
  //     longitude: 120.199364,
  //     latitude: 30.243451
  //   },
  //   title: '爱罗婚纱摄影',
  //   info: '上城区秋涛路296号尚筑金座206室<br>(0571)81390097'
  // });

});
</script>
<?php include THEMES_PATH.'public/footer2.phtml';?>
<?php include THEMES_PATH.'public/after_body.phtml';?>